Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

점검화면 추가 #356

Merged
merged 16 commits into from
Sep 29, 2024
Merged

점검화면 추가 #356

merged 16 commits into from
Sep 29, 2024

Conversation

plgafhd
Copy link
Collaborator

@plgafhd plgafhd commented Sep 29, 2024

No description provided.

@plgafhd plgafhd requested a review from a team as a code owner September 29, 2024 07:06
LaunchedEffect(Unit) {
remoteConfig.noticeConfig.collect {
if (it.visible) {
navController.navigateAsOrigin("${NavigationDestination.ImportantNotice}?title=${URLEncoder.encode(it.title, "UTF-8").replace("+", "%20")}&content=${URLEncoder.encode(it.content, "UTF-8").replace("+", "%20")}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+를 공백으로 바꿔주는 URLEncoder.encode()는 왜 필요한거야? 서버에서 그렇게 내려오기도 하나?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URLEncoder.encode가 공백을 +로 바꿔버림
그래서 다시 공백으로 바꾸는 과정

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 그리고 URLEncoder.encode를 쓴 이유는
내용에 한글이 들어가면 처리가 안되는 경우가 있대

Copy link
Collaborator

@eastshine2741 eastshine2741 Sep 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

음 일단 그 인코딩때문에 크래시 나는거같은데 함 볼래?
로그 찍어보니 한글 잘 받는데 인코딩하면서 이상해지는듯
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 뭐지 내가 같은 크래시가 나서
URLEncoder.encode를 안쓰다가 쓴건데 다시 바꿔봐야겠다

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일단 저 URLEncoder.encoe()는 문자열 -> application/ x-www-form-urlencode 변환하는 함수고, 내비게이션에서의 argument에 전달할 때 그런 변환이 필요하진 않을듯

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

argument안쓰고, ImportantNoticePage에서 한 번 더 collect하는 방법으로 수정

Comment on lines 64 to 68
fun RemoteConfigDtoNetwork.NoticesConfig.toExternalModel() = RemoteConfigDto.NoticesConfig(
visible = visible ?: false,
title = title,
content = content,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data class ImportantNotice있던데 RemoteConfigDto.NoticeConfig 말고 ImportantNotice 쓰는거어때?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그 이게 RemoteConfigDto 전체를 externalmodel로 바꿀 때 쓰려고 만든거라서
(요 부분 위에 있는 RemoteConfigDtoNetwork.toExternalModel())
그러면 아예 그냥 RemoteConfigDto 자체가 NoticeConfig를 쓰지 않고 ImportantNotice를 쓰게 바꿔야하긴 해

@eastshine2741 eastshine2741 changed the title 긴급 패치 점검화면 추가 Sep 29, 2024
@plgafhd plgafhd enabled auto-merge (squash) September 29, 2024 09:30
@plgafhd plgafhd merged commit c43483f into develop Sep 29, 2024
3 checks passed
@plgafhd plgafhd deleted the plgafhd/important-notice branch September 29, 2024 09:34
JuTaK97 added a commit that referenced this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants